<?php
if(!defined('BASEPATH'))
    exit('No direct script access allowed');

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of jenisbiaya_model
 *
 * @author miyzan
 */
class jenisbiaya_model extends MY_MODEL{
    //put your code here
    
    function __construct() {
        parent::__construct();
        // $this->load->database();
    }
    
    function get_rows($search="",$start,$limit) {
        $sql_search="";
        if ($search != "") {
            $sql_search = "(lower(id_jenis) LIKE '" . strtolower($search) . "%' or lower(no_rek) LIKE '" . strtolower($search) . "%' or lower(keterangan) LIKE '%" . strtolower($search) . "%')";
//            $this->db->where($sql_search, NULL);
        }
        $select="id_jenis,keterangan,no_rek,rek_keterangan";
        $order=array("id_jenis", "asc");     
        $table="v_jenis_bi";
        
        $results = $this->get_rows_paging($sql_search,$start,$limit,$table,$select,$order);
        return $results;       
        
    }  
    
    function get_rows_combo() {
        $sql_search="";        
        $select="id_jenis,keterangan";
        $order=array("id_jenis", "asc");     
        $table="jenis_biaya";
        
        $results = $this->get_rows_table($sql_search, $table, $select, $order);
        return $results;       
        
    }  
}

?>
